package hjw.com.service;

import hjw.com.dao.OrderMapper;
import hjw.com.entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>Project:Academic - OrderServiceImpl
 *
 * @author IvanWei玮 -- maste
 * @version 1.0
 * @DataTime 2025/2/18 13:51
 * @since 1.8
 */
@Service
public class OrderServiceImpl implements OrderService{
    private final OrderMapper orderDao;

    @Autowired
    public OrderServiceImpl(OrderMapper orderDao) {
        this.orderDao = orderDao;
    }
    @Override
    public int addOrder(Map<String, Object> map) {
        return orderDao.addOrder(map);
    }

    @Override
    public Order findByOrdid(Map<String,Object> map) {
        return orderDao.findByOrdid(map);
    }

    @Override
    public List<Order> getOrder(Map<String, Object> map) {
        return orderDao.getOrder(map);
    }

    @Override
    public int updateOrder(Map<String, Object> map) {
        return orderDao.updateOrder(map);
    }

    @Override
    public List<Order> findByParams(Map<String, Object> map) {
                      return orderDao.findByParams(map);
    }

    @Override
    public int getOrderCount(Map<String, Object> map) {
        return orderDao.getOrderCount(map);
    }
}
